import React, { Component } from 'react';
import SimpleUtilPage from './SimpleUtilPage';

const struct = {
  url: '/json/json2Pojo',
  demoValue: '{"data":1}',
  inputDefinitions:[
    {label: '完全限定类名', name:'className'}
  ],
  checkBoxDefinitions: [
    { label: 'lombok' }
  ],
  radioGroupDefinitions: [
    {
      label: '时间类型',
      name: 'timeType',
      defaultValue: 'java8TimeApi',
      options:[{value:'java8TimeApi', label:'java8TimeApi'}, {value:'String',label:'String'},{value: 'Date', label: 'Date'},{value: 'Long', label: 'Long'}]
    },
    {
      label: '序列化方式(如果用gson等, 那意味着全体驼峰法, 但是通过注解赋值别名)',
      name: 'serializationType',
      defaultValue: 'origin',
      options:[{value:'origin', label:'json如何命名就如何命名'}, {value:'gson',label:'gson'},{value: 'jackson', label: 'jackson'},{value: 'fastjson2', label: 'fastjson2'},{value: 'allCamelCase', label: '全驼峰法'}, {value: 'allUnderline', label: '全下划线'}]
    }
  ]
};

function Json2Pojo() {
  return <SimpleUtilPage struct={struct} />;
}

export default Json2Pojo;
